package main

import "fmt"

const a = 100

var b = 200

var d = 400

func showB() int {
	return b
}

func main() {
	// fmt.Printf("1.1 %p,%v\n", &a, a) // 常量不能获取地址
	fmt.Println(1, a)
	var a = 500
	fmt.Println(2, a, &a)

	fmt.Println(3, b, &b)
	b = 600
	fmt.Println(3.1, b, &b)
	b := 601
	fmt.Println(3.2, b, &b)
	fmt.Println(3.3, showB())

	{
		const j = 'A'
		var k = "magedu"
		t := true
		a = 700
		b := 800
		fmt.Println(4, j, k, t, a, b)
		{
			x := 900
			fmt.Println(4.1, a, b, d, j, k, t, x)
		}
		// fmt.Println(4.2,x)
	}
	// fmt.Println(4.3, j, k, t)
	fmt.Println(4.4, a, b)

	for i, v := range []int{1, 3, 5} {
		fmt.Println(i, v)
	}
	// fmt.Println(i, v)
}
